package com.yorge.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMQConfig {
    @Bean
    public Queue[] yorgeQueue() {
        // 第一个参数是创建的queue的名字，第二个参数是是否支持持久化
        Queue yorge = new Queue("yorge", true);
        Queue yorge1 = new Queue("yorge1", true);
        Queue yorge2 = new Queue("yorge2", true);
        Queue yorge3 = new Queue("yorge3", true);
        return new Queue[]{yorge,yorge1,yorge2,yorge3};
    }
}
